# -*- coding: utf-8 -*-
"""
main
2025/9/3
@author: zhangzida
"""

from Page.Page import Page
from selenium import webdriver
import pytest,logging
@pytest.fixture(scope='function')
def driver():
    # 浏览器
    driver=webdriver.Edge()
    # 隐式等待
    driver.implicitly_wait(5)
    # 屏幕最大化
    driver.maximize_window()
    yield driver
def test_select(driver):
    try:
        po=Page(driver)
        po.luoji_sjk()
    except ValueError as e:
        print(f'{logging.error(e)}数据超时')
    except AssertionError as e:
        print(f'{logging.error(e)},用户名或密码错误')
    except Exception as e:
        print(e)
